stmwpp: Fix ZERO-trimming code in stmwpp_write_double.
authoroliskoli <oliskoli>
Thu, 7 Jun 2007 22:35:00 +0000 (22:35 +0000)
committeroliskoli <oliskoli>
Thu, 7 Jun 2007 22:35:00 +0000 (22:35 +0000)
stmwpp.c

index 311bac403966754801bfacdf7efa486808d9ba0e..af8a0ee230c5848a021675687e4987806dc5f44f 100644 (file)
--- a/stmwpp.c
+++ b/stmwpp.c
@@ -211,7 +211,7 @@ stmwpp_write_double(const double val)
        
        c = buff + snprintf(buff, sizeof(buff), "%3.7f", val);
        while (*--c == '0') *c = '\0';
-       if (*c == '.') *c = '0';
+       if (*c == '.') *++c = '0';
        gbfprintf(fout, "%s,", buff);
 }